import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'

Vue.config.productionTip = false
//图片大小设置
Vue.filter("imageView", function (value, size) {
  if (!value) return "";
  value = value.toString();
  return value + "?imageView=1&type=webp&thumbnail=" + size + "x0";
});

//更新时间
Vue.filter("unixToDate", function (value) {
  if (!value) return "";
  var d = new Date(value);
  return d.getMonth() + 1 + "月" + d.getDate() + "日更新";
});
//更新时间2
Vue.filter("unixToDate2", function (value) {
  if (!value) return "";
  var d = new Date(value);
  return d.getFullYear() + "年" + (d.getMonth() + 1) + "月" + d.getDate() + "日";
});

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

